#ifndef MATH_EXCEPTION_H_
#define MATH_EXCEPTION_H_

#include "../common.h"

namespace physicsworks {
	
namespace math {

namespace exception {

/**
 * Math exception class.
 */
class EMath {
private:
	std::string excMsg;
	
public:
	EMath(const std::string& m) : excMsg(m) {}
	virtual ~EMath() {}
	
	virtual std::string msg() const {
		return excMsg;
	}
};

/**
 * Undefined math operation exception.
 */
class EUndefMathOpt : public EMath {
public:
	EUndefMathOpt(const std::string& m) : EMath(m) {}
	~EUndefMathOpt() {}
};

/**
 * Bad argument exception.
 */
class EBadArg : public EMath {
public:
	EBadArg(const std::string& m) : EMath(m) {}
	~EBadArg() {}
};

}

}

}

#endif /*MATH_EXCEPTION_H_*/
